package com.yien.springstudy.result;

import org.apache.tomcat.util.http.ResponseUtil;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;

/**
 * result
 *
 * @author Miaoxiong Fan
 * @since version
 */

public class ResultVO {

    private ResultVO(){}

    public static ResponseEntity<Object> success(Object data) {
        ResponseEntity responseEntity = new ResponseEntity(data , HttpStatus.OK);
        return responseEntity;
    }

    public static ResponseEntity<Object> fail() {
        ResponseEntity responseEntity = new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR);
        return responseEntity;
    }
}
